<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'GxiugaiDiZhi.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" href="css/Gxgdizhi.css" type="text/css">
	<script src="js/jquery-1.8.3.js"></script>
	<script type="text/javascript">
	     //定义一个二维数组，存储省、市信息
     var provList=['河北省(城市列表)','河南省(城市列表)','山东省(城市列表)','山西省(城市列表)'];
     provList[0]=['石家庄市','邯郸市','邢台市','保定市'];
     provList[1]=['郑州市','安阳市','洛阳市','商丘市'];
     provList[2]=['青岛市','济南市','日照市','淄博市'];
     provList[3]=['太原市','大同市','吕梁市','晋城市'];
     $(function () {
         $('#province').change(function () {
             $('#city').empty();
             var prov =$(this).val();
             if (prov!=-1){
                 var cityList =provList[prov];
                 console.log(cityList);
                 $.each(cityList,function (i,e) {
                     var opt = $('<option value="' + e + '">' + e + '</option>');
                     $('#city').append(opt);
                 })
             }else {
                 $('#city').append('<option value="-1">请选择</option>');
             }
         })
     })
	     
	     $(function(){
	     	$("#form").submit(function () {
		        var a =$('#sjh').val();
		        if(b!=''){
		        	var sjh = /^1\d{10}$/
		            if(sjh.test(a)){
		                
		            }else{
		                $('#sjh').attr('placeholder','手机号不能为空')
		                return false;
		            }
		        }else{
		            $('#name').attr('placeholder','姓名不能为空')
		            return false;
		        }
		     })
	     })
	</script>
  </head>
  
  <body>
  <div class="body">
    <div class="zhong">
        <div>
            <div id="logo"><a href="shouye.html"><img src="images/denglu_03.gif" height="85" width="85"/></a></div>
            
        </div>
        <div id="wen">
	        <form action="Gstianjiadizhi.do" id="form"> 
	        	<div class="shezhi">管理收货地址</div>
	        	<div class="namek"><input type="text" name="name" id="name" style="line-height: 43.44px; width: 318px; border-width: 0px;" placeholder="收货人姓名" ></div>
	        	<div class="namek"><input type="text" name="sjh" id="sjh" style="line-height: 43.44px; width: 318px; border-width: 0px;" placeholder="手机号" ></div>
	        	<div class="">
                      <select name="sheng" id="province" class="shengfen">
                          <option value="-1">请选择省份</option>
                          <option value="1">河北省</option>
                          <option value="2">河南省</option>
                          <option value="3">山东省</option>
                          <option value="4">山西省</option>
                      </select>
                </div>
                <div class="city">
                    <select name="cheng" id="city" >
                        <option value="-1">请选择城市</option>
                    </select>
                    <select name="xian" id="xian">
                    <option value="-1">请选择县</option>
                        <option value="邯郸县">邯郸县</option>
                        <option value="临漳县">临漳县</option>
                        <option value="肥乡县">肥乡县</option>
                        <option value="大名县">大名县</option>
                    </select>
                </div>
	        	<div class="namek">
	        		<input type="text" name="xx" id="mima" style="line-height: 43.44px; width: 318px; border-width: 0px;" placeholder="详细地址，如街道名称，楼层，门牌号码等" >
	        	</div>
                <button type="submit" style=" background-color: #5079d9;width: 390px ;height: 50px;border-radius: 8px; color: #ffffff;font-size: 17px">提交</button>
	        </form>
        </div>
    </div>
    
    <div id="jiao">Copyright © 2017, Smartisan Digital Co., Ltd. All Rights Reserved.北京锤子数码科技有限公司&emsp;|&emsp;<a href="#">法律声明</a>&emsp;|&emsp;<a href="#">隐私条款</a><br>
    <a>京ICP备14041720号-1京ICP证140622号京公网安备11010502025474</a>
    </div>
</div>
  
  
    <div class="ha"></div>
        
        </div>
  </body>
</html>
